A conventional motor control apparatus controls operation of a motor (rotary electric machine) by controlling turning on and off of a plurality of switching elements. The motor control apparatus generally has a capacitor to suppress ripple currents, which are generated when electric power is supplied from an electric power source to a motor. An electric power supply relay is provided between the power source and the capacitor to permit or interrupt flow of current from the power source to the capacitor and the motor by controlling turning on and off of the power supply relay.
In case that the motor is used in an electric power steering system, failure (abnormality) check is performed to check whether the motor control apparatus has any failure in its electric circuits or the like before the motor is started to operate. This failure check may not be performed accurately, if the capacitor stores remaining electric charge therein. For example, the power supply relay is checked whether it has a short-circuit failure, in which the power supply relay is persistently in the turned-on state irrespective of being controlled to turn on and off. In this case, a voltage developed at the motor side is detected under a condition that the power supply relay is controlled to the turned-off state, in which the power source and the motor are disconnected electrically. If the capacitor still stores electric charge therein, a voltage developed by the capacitor is detected as the voltage of the motor side. As a result, the power supply relay is determined erroneously to be in the short-circuit failure, even though the power supply relay has no such failure. If the failure check operation thus is not performed properly, it takes some time for the electric power steering system to start its operation.
For example, if an air-conditioner, headlights, wipers and the like of a vehicle consume large electric power while the electric power steering system is in operation, the electric power supply to the motor may be interrupted temporarily and the motor of the electric power steering system may be disabled to operate temporarily. The motor is desired to restore its normal operation in such a case. It is therefore necessary to perform the failure check operation accurately and without delay. If the voltage developed by the capacitor is applied to the switching element, to which a fixed control signal is not applied, under a condition that the capacitor still stores electric charge, the switching element is likely to be damaged. To solve the above drawback, the following patent documents 1 and 2 propose that the motor control apparatus is configured to discharge the electric charge remaining in the capacitor.    Patent document 1: JP 7-7807A    Patent document 2: 2008-94342A (EP 2 075 903 A1)
However, according to patent document 1, a motor control apparatus requires an electric circuit (switches, resistors and the like) exclusive to discharge electric charge of the capacitor and thus results in increase in size and cost.
According to patent document 2, a motor control apparatus has no circuit exclusive to discharge but is configured to discharge electric charge of a capacitor through a motor without influencing on torque of the motor. Although it is so configured not to influence on the torque in theory, it is practically difficult to discharge the capacitor without influence on the torque due to variations in associated devices. For this reason, the circuit or the like may be damaged by rapid power supply caused by the discharge. If the motor control apparatus is used in the electric power steering system, a driver may feel uneasiness because of unexpected operation of the motor. Since the motor control apparatus supplies the motor with discharge current not to influence on the torque, it is necessary to check whether a position sensor (rotation angle sensor), switching elements, a current sensor and the like for the motor need be checked as to whether they are normal or in failure. The motor control apparatus thus is required to perform complicated check processing and needs time to complete discharging.